﻿<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp" %>
<link href="${baseURL}/css/public.css" rel="stylesheet" type="text/css"/>
<link href="${baseURL}/css/product.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function clickSS(){
	document.getElementById("Image8").click(); 
	$("#Image8").click();
}
$(document).ready(function(){
	
	var tablename=document.getElementById("userTable");
	var li=tablename.getElementsByTagName("tr");
	for (var i=1;i<=li.length;i++){
	if (i%2==0){
	li[i].style.backgroundColor="#f6f6f6";
	}else li[i].style.backgroundColor="#FFFFFF";
	}

});
</script>
<div class='section-right-order'>
	<form action="${ctx}/companyAdmin/companyListUser" method="post" name="searchForm" id="searchForm">
	<input type="hidden" name="p" value="1" />
    <input type="hidden" name="sid" value="${formdata.sid}" />
	<div class='adduser'>
	<div class='adduser-left'><div class='adduser-icon'></div><span>
			用户管理
	</span></div>
	<!-- <div class='adduser-left'><div class='adduser-icon' onclick="window.location = 'toAddUser?sid=${formdata.sid}';"></div><span>
			<a href="#" class="a2_blue" onclick="window.location = 'toAddUser?sid=${formdata.sid}';">添加用户</a>
	</span></div> -->	
	</div>
	<div class='querycondition'>
		<div class='condtiontitle'><div class='searchcondition'></div>搜索条件：</div>
		<div class='condtion'>
			用户名：<input name="username" type="text" id="username" value="${formdata.username}" size="20"/>
			备注：<input name="realname" type="text" id="realname" value="${formdata.realname}" size="20"/>
			<input name="image" style="display:none" type="image" id="Image8" onmouseover="MM_swapImage('Image8','','${baseURL}/images/button_ss_a.jpg',1)" onmouseout="MM_swapImgRestore()" src="${baseURL}/images/button_ss.jpg"/>&nbsp;&nbsp;		
			<input type='button' value='搜索'  class='button cyan medium' onclick="clickSS();">&nbsp;&nbsp;		
		</div>
	</div>
	</form>
		<c:if test="${empty obj.list}">
			<div align="center"><b>没有符合条件的记录。</b></div>
		</c:if>
		<c:if test="${not empty obj.list}">
		<div class='userlist-title'>
			<div class='userlist-title-left'><div class='userlist-title-icon'></div><span>用户列表</span></div>
		</div>
		<div class='userlist'>
		<table cellpadding=0 cellspacing=0 id="userTable">
			<tr class='userlist-tr-title'>
				<td class='userlist-td operation'></td>	
				<td class='userlist-td order-ino'>编号</td>	
				<td class='userlist-td user-name'>用户名</td>	
				<td class='userlist-td memo'>备注</td>	
				<td class='userlist-td userlist-td-r action'>操作</td>	
			</tr>
			<c:forEach var="oneRow" items="${obj.list}">
				<tr class='userlist-tr-content' align="center">
					<td class='userlist-td'><input name="chk" type="checkbox" id="chk" value="${oneRow.id}" /></td>
					<td class='userlist-td'>${oneRow.id}</td>
					<td class='userlist-td'>${oneRow.username}</td>
					<td class='userlist-td'>${oneRow.remark}</td>
					<td class='userlist-td userlist-td-r'>
						<a href="toEditUser?id=${oneRow.id}">[编辑]</a>
						<a href="#" onclick="delById('${ctx}',${oneRow.id})">[删除]</a>
					</td>
				</tr>
			</c:forEach>
		</table>
		<table>
		  <tr>
		    <td height="25" colspan="2"><%@ include file="../include/listpage.jsp"%>
		    </td>
		  </tr>
		</table>
		</div>
		</c:if>
	</div>
<script>
function clearInput() {
	document.getElementById("username").value = "";
	document.getElementById("realname").value = "";
}

function selectAll(checkAllFlag) {
	var checkArray = document.getElementsByName("chk");
	for (var i = 0; i < checkArray.length; i++) {
		checkArray[i].checked = checkAllFlag;
	}
}
</script>
<script src="${ctx}/js/listCompanyUser.js"></script>

<%@ include file="../include/bottom.jsp"%>